<?php
/**
 * 分页模型
 * @author mlkr
 *
 */
class Paging{
    public $pageSize;
    public $pageNow;
    public $pageCount;
    public $rowCount;
    public $offset;
    public $res_array;


function __construct($pageNow = 1,$pageSize = 500){
        $this->pageNow = $pageNow;
        $this->pageSize = $pageSize;
    }
    
 /**
     * @return $offset
     */
    public function getOffset()
    {
        return $this->offset = ($this->getPageNow()-1) * $this->getPageSize();
    }


 /**
     * @return $pageSize
     */
    public function getPageSize()
    {
        return $this->pageSize;
    }

 /**
     * @return $pageNow
     */
    public function getPageNow()
    {
        return $this->pageNow;
    }

 /**
     * @return $pageCount
     */
    public function getPageCount()
    {
        return $this->pageCount;
    }

 /**
     * @return $rowCount
     */
    public function getRowCount()
    {
        return $this->rowCount;
    }

 /**
     * @return $res_array
     */
    public function getRes_array()
    {
        return $this->res_array;
    }

    /**
     * @param !CodeTemplates.settercomment.paramtagcontent!
     */
    public function setPageCount($pageCount)
    {
        $this->pageCount = $pageCount;
    }
    
    /**
     * @param !CodeTemplates.settercomment.paramtagcontent!
     */
    public function setRowCount($rowCount)
    {
        $this->rowCount = $rowCount;
    }
    
    
    /**
     * @param !CodeTemplates.settercomment.paramtagcontent!
     */
    public function setRes_array($res_array)
    {
        $this->res_array = $res_array;
    }
    
}